/*
package com.jinxin.phonecloudmusic.myapplication.fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.jinxin.phonecloudmusic.myapplication.R;
import com.jinxin.phonecloudmusic.myapplication.adapter.MusicSearchSingerAdapter;
import com.jinxin.phonecloudmusic.myapplication.base.BaseFragment;
import com.jinxin.phonecloudmusic.myapplication.entity.GroupBean.Search;
import com.jinxin.phonecloudmusic.myapplication.entity.MusicBean.Artist;
import com.jinxin.phonecloudmusic.myapplication.entity.MusicBean.Song;
import com.jinxin.phonecloudmusic.myapplication.event.MusicControlEvent;
import com.jinxin.phonecloudmusic.myapplication.utils.RxBus;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;

*/
/**
 * Created by ZJ on 2017/10/13 0013.
 * 歌手（搜索）
 *//*


public class SearchMusicSingerFragment extends BaseFragment{
    @BindView(R.id.lv_search_music)
    ListView lvSearchMusic;

    private Search search;

    private List<Song> singers=new ArrayList<>();
    private MusicSearchSingerAdapter musicSearchSingerAdapter;
    @Override
    public View inflate(LayoutInflater inflater, ViewGroup container) {
        return inflater.inflate(R.layout.fra_music_search_singer, container, false);
    }

    @Override
    public void initData() {
        RxBus.getDefault().register(MusicControlEvent.class).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<MusicControlEvent>() {
            @Override
            public void accept(MusicControlEvent event) throws Exception {
                if (((int)event.getTag()) == 20) {//20:搜索结果
                    search= (Search) event.getObj1();
                    singers=search.getSongList();

                    //适配数据
                    if (null==musicSearchSingerAdapter){
                        musicSearchSingerAdapter=new MusicSearchSingerAdapter(getActivity(),R.layout.item_music_search_singer,singers);
                    }else {
                        musicSearchSingerAdapter.replaceAll(singers);
                    }
                    if (null!=lvSearchMusic)
                    lvSearchMusic.setAdapter(musicSearchSingerAdapter);
                }
            }
        });
    }


}
*/
